<h1>New company</h1>

<% form_tag({:action => 'create' }, { :multipart => true }) do %>
	
	<%= error_messages_for 'company' %>
	
	<p><label for="company_name">Name</label><br/>
	<%= text_field 'company', 'name'  %></p>
	
	<p><label for="company_description">Description</label><br/>
	<%= text_field 'company', 'description'  %></p>
	
	<div id="new_items">
		<% @company.portfolio_items.each_with_index do |item, index| %> 
	   		<%= render :partial => 'portfolio_items/new', :locals => { :portfolio_item => item, :index => index } %>
	  	<% end %>
	</div>
	
   	<%= render :partial => 'portfolio_items/new_link', :locals => { :index => @company.portfolio_items.size } %>
 
 	<%= submit_button %>
 	
<% end %>